package 字符串;

public class LC_459重复的子字符串 {
    public static void main(String[] args){
        String s="aba";
        System.out.println(repeatedSubstringPattern(s));
    }

    public static boolean repeatedSubstringPattern(String s) {
        String str=s+s;
        str=str.substring(1,str.length()-1);
        return str.contains(s);
    }
}
